<%--
  Created by IntelliJ IDEA.
  User: Admin
  Date: 2019/12/18
  Time: 9:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
    <title>Title</title>

    <style type="text/css">
       tr:nth-child(odd){
           background-color: aqua;
       }
       tr:nth-child(even){
           background-color: aquamarine;

       }
    </style>
     
</head>

<body>
<h2 align="center">全部主题>></h2>
<table align="center" border="1">
    <tr>
        <td>序号</td>
        <td>主题</td>
        <td>投票/查看</td>
        <td>创建时间</td>
    </tr>

    <c:forEach var="s" items="${Subjects}">
        <tr>
            <td> ${s.id }</td>
            <td><a href="show?id=${s.id}">${s.title}</a></td>
            <td>${s.totalVotes }/${s.viewTimes }</td>
            <td><fmt:formatDate value="${s.createDate }" pattern="yyyy-MM-dd"/></td>
        </tr>
    </c:forEach>

</table>

</body>
</html>
